package 代理模式.impl;

import 代理模式.Instance;

public class Mishu implements Instance {
    private Instance target;//代理的目标对象

    public Mishu(Instance target) {
        this.target = target;
    }

    public void setTarget(Instance target) {
        this.target = target;
    }

    @Override
    public void invite() {
        System.out.println("我是秘书");
        target.invite();//执行目标对象后的功能
        System.out.println("后续");
    }
}
